package com.example.kt_base.s4

//TODO 77.Kotlin语言的构造初始化顺序

//第一步:生成val sex:Char
class KtBase77(_name:String,sex:Char){
    //第二步:生成 val mName
    val mName=_name
    init {
        val nameValue=_name  //第三步：生成nameValue
        println("init代码块打印：nameValue:$nameValue")
    }
    constructor(name:String,sex:Char,age:Int):this(name,sex){
        //第五步：生成次构造的细节
        println("次构造三个函数：name:$name,sex:$sex,age:$age")
    }

    //第四步
    val derry="aaa"
}
fun main() {

    KtBase77("derry",'男',18)

}
